package br.ufrj.dcc.tp.common;

import java.io.Serializable;
import java.util.Date;

public class Message implements Serializable {

	private static final long serialVersionUID = 1L;
	private Client fromClient;
	private Date date;
	private String message;
	
	public Message(Client from, Date date, String message){
		this.fromClient = from;
		this.date = date;
		this.message = message;
	}
	
	public Client getFromClient() {
		return fromClient;
	}

	public Date getDate() {
		return date;
	}

	public String getMessage() {
		return message;
	}

	@Override
	public String toString() {
		return fromClient + ": " + message;
	}
}
